<template>
<div class="mt-[20px]">
    <evaluationKitDetail v-if="showDetail" @close="showDetail=false" />
    <div class="item" v-for="(item, index) in itemList" v-else>
    <div class="p-[16px] mb-[20px] img-box">
        <img :src="item.img" class="w-[310px] h-[214px]" alt="">
    </div>
    <div class="title">{{ item.title }}</div>
    <div class="content">{{ item.content }}</div>
    <div class="magnifier-btn" @click="handleShowDetail">
        <img :src="magnifier.src" alt="">
    </div>
    
    </div>
</div>

</template>
<script setup>
import { ref } from 'vue'
import ES5030 from '@assets/ES5030(1).png'
import magnifier from '@assets/magnifier.png'
import evaluationKitDetail from '@components/evaluationKitDetail.vue'
const showDetail= ref(false)
const itemList= ref([
    {
    title: 'EVB-ES5030',
    content: 'EVB-ES5030 |紧凑型、高效率、高速同步单片式3A降压开关稳压器',
    img: ES5030.src
    }
])
const handleShowDetail=()=>{
    showDetail.value=true
}
</script>
<style lang="scss" scoped>
.magnifier-btn{
    width: 40px;
height: 30px;
border-radius: 2px 0px 2px 0px;
opacity: 1;
display: flex;
justify-content: center;
align-items: center;
background: #712C2F;
position: absolute;
right: 0;
bottom: 0;
cursor: pointer;
}
.content{
font-family: Source Han Sans;
font-size: 14px;
font-weight: normal;
line-height: normal;
color: #3D3D3D;
padding-left: 16px;
padding-right: 16px;
box-sizing: border-box;
}
.title{
    font-family: Source Han Sans;
font-size: 20px;
font-weight: 500;
color: #3D3D3D;
margin-bottom: 20px;
padding-left: 16px;
padding-right: 16px;
box-sizing: border-box;
}
.img-box{
    border-bottom: 1px solid #D8D5D5;
}

.item{
width: 342px;
height: 376px;
opacity: 1;
border: 1px solid #D8D5D5;
position: relative;
}
</style>